Integrand size = 23, antiderivative size = 215 \[ \int \left (a+b \sin ^n(c+d x)\right )^2 \tan ^m(c+d x) \, dx=\frac {a^2 \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{2},\frac {3+m}{2},-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x)}{d (1+m)}+\frac {2 a b \cos ^2(c+d x)^{\frac {1+m}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+m}{2},\frac {1}{2} (1+m+n),\frac {1}{2} (3+m+n),\sin ^2(c+d x)\right ) \sin ^n(c+d x) \tan ^{1+m}(c+d x)}{d (1+m+n)}+\frac {b^2 \cos ^2(c+d x)^{\frac {1+m}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+m}{2},\frac {1}{2} (1+m+2 n),\frac {1}{2} (3+m+2 n),\sin ^2(c+d x)\right ) \sin ^{2 n}(c+d x) \tan ^{1+m}(c+d x)}{d (1+m+2 n)} \]
a^2*hypergeom([1, 1/2+1/2*m],[3/2+1/2*m],-tan(d*x+c)^2)*tan(d*x+c)^(1+m)/d /(1+m)+2*a*b*(cos(d*x+c)^2)^(1/2+1/2*m)*hypergeom([1/2+1/2*m, 1/2+1/2*m+1/ 2*n],[3/2+1/2*m+1/2*n],sin(d*x+c)^2)*sin(d*x+c)^n*tan(d*x+c)^(1+m)/d/(1+m+ n)+b^2*(cos(d*x+c)^2)^(1/2+1/2*m)*hypergeom([1/2+1/2*m, 1/2+1/2*m+n],[3/2+ 1/2*m+n],sin(d*x+c)^2)*sin(d*x+c)^(2*n)*tan(d*x+c)^(1+m)/d/(1+m+2*n)
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 16.74 (sec) , antiderivative size = 2368, normalized size of antiderivative = 11.01 \[ \int \left (a+b \sin ^n(c+d x)\right )^2 \tan ^m(c+d x) \, dx=\text {Result too large to show} \]
(2*(Cos[c + d*x]*Sec[(c + d*x)/2]^2)^m*((a^2*AppellF1[(1 + m)/2, m, 1, (3 + m)/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2])/(1 + m) + b*(Sec[(c + d* x)/2]^2)^n*Sin[c + d*x]^n*((2*a*AppellF1[(1 + m + n)/2, m, 1 + n, (3 + m + n)/2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2])/(1 + m + n) + (b*AppellF1 [1/2 + m/2 + n, m, 1 + 2*n, 3/2 + m/2 + n, Tan[(c + d*x)/2]^2, -Tan[(c + d *x)/2]^2]*(Sec[(c + d*x)/2]^2)^n*Sin[c + d*x]^n)/(1 + m + 2*n)))*Tan[(c + d*x)/2]*Tan[c + d*x]^m*(a^2*Tan[c + d*x]^m + 2*a*b*Sin[c + d*x]^n*Tan[c + d*x]^m + b^2*Sin[c + d*x]^(2*n)*Tan[c + d*x]^m))/(d*(2*m*(Cos[c + d*x]*Sec [(c + d*x)/2]^2)^m*Sec[c + d*x]^2*((a^2*AppellF1[(1 + m)/2, m, 1, (3 + m)/ 2, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2])/(1 + m) + b*(Sec[(c + d*x)/2] ^2)^n*Sin[c + d*x]^n*((2*a*AppellF1[(1 + m + n)/2, m, 1 + n, (3 + m + n)/2 , Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2])/(1 + m + n) + (b*AppellF1[1/2 + m/2 + n, m, 1 + 2*n, 3/2 + m/2 + n, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2 ]^2]*(Sec[(c + d*x)/2]^2)^n*Sin[c + d*x]^n)/(1 + m + 2*n)))*Tan[(c + d*x)/ 2]*Tan[c + d*x]^(-1 + m) + Sec[(c + d*x)/2]^2*(Cos[c + d*x]*Sec[(c + d*x)/ 2]^2)^m*((a^2*AppellF1[(1 + m)/2, m, 1, (3 + m)/2, Tan[(c + d*x)/2]^2, -Ta n[(c + d*x)/2]^2])/(1 + m) + b*(Sec[(c + d*x)/2]^2)^n*Sin[c + d*x]^n*((2*a *AppellF1[(1 + m + n)/2, m, 1 + n, (3 + m + n)/2, Tan[(c + d*x)/2]^2, -Tan [(c + d*x)/2]^2])/(1 + m + n) + (b*AppellF1[1/2 + m/2 + n, m, 1 + 2*n, 3/2 + m/2 + n, Tan[(c + d*x)/2]^2, -Tan[(c + d*x)/2]^2]*(Sec[(c + d*x)/2]^...
Time = 0.53 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 3713, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^m(c+d x) \left (a+b \sin ^n(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^m \left (a+b \sin (c+d x)^n\right )^2dx\) |
\(\Big \downarrow \) 3713 |
\(\displaystyle \int \left (a^2 \tan ^m(c+d x)+2 a b \tan ^m(c+d x) \sin ^n(c+d x)+b^2 \tan ^m(c+d x) \sin ^{2 n}(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 \tan ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-\tan ^2(c+d x)\right )}{d (m+1)}+\frac {2 a b \cos ^2(c+d x)^{\frac {m+1}{2}} \tan ^{m+1}(c+d x) \sin ^n(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {m+1}{2},\frac {1}{2} (m+n+1),\frac {1}{2} (m+n+3),\sin ^2(c+d x)\right )}{d (m+n+1)}+\frac {b^2 \cos ^2(c+d x)^{\frac {m+1}{2}} \tan ^{m+1}(c+d x) \sin ^{2 n}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {m+1}{2},\frac {1}{2} (m+2 n+1),\frac {1}{2} (m+2 n+3),\sin ^2(c+d x)\right )}{d (m+2 n+1)}\) |
(a^2*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, -Tan[c + d*x]^2]*Tan[c + d *x]^(1 + m))/(d*(1 + m)) + (2*a*b*(Cos[c + d*x]^2)^((1 + m)/2)*Hypergeomet ric2F1[(1 + m)/2, (1 + m + n)/2, (3 + m + n)/2, Sin[c + d*x]^2]*Sin[c + d* x]^n*Tan[c + d*x]^(1 + m))/(d*(1 + m + n)) + (b^2*(Cos[c + d*x]^2)^((1 + m )/2)*Hypergeometric2F1[(1 + m)/2, (1 + m + 2*n)/2, (3 + m + 2*n)/2, Sin[c + d*x]^2]*Sin[c + d*x]^(2*n)*Tan[c + d*x]^(1 + m))/(d*(1 + m + 2*n))
3.6.75.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*((c_.)*sin[(e_.) + (f_.)*(x_)])^(n_))^(p_.)*((d_.)*tan[(e _.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int[ExpandTrig[(d*tan[e + f*x])^m*(a + b*(c*sin[e + f*x])^n)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0]
\[\int {\left (a +b \left (\sin ^{n}\left (d x +c \right )\right )\right )}^{2} \left (\tan ^{m}\left (d x +c \right )\right )d x\]
\[ \int \left (a+b \sin ^n(c+d x)\right )^2 \tan ^m(c+d x) \, dx=\int { {\left (b \sin \left (d x + c\right )^{n} + a\right )}^{2} \tan \left (d x + c\right )^{m} \,d x } \]
\[ \int \left (a+b \sin ^n(c+d x)\right )^2 \tan ^m(c+d x) \, dx=\int \left (a + b \sin ^{n}{\left (c + d x \right )}\right )^{2} \tan ^{m}{\left (c + d x \right )}\, dx \]
\[ \int \left (a+b \sin ^n(c+d x)\right )^2 \tan ^m(c+d x) \, dx=\int { {\left (b \sin \left (d x + c\right )^{n} + a\right )}^{2} \tan \left (d x + c\right )^{m} \,d x } \]
\[ \int \left (a+b \sin ^n(c+d x)\right )^2 \tan ^m(c+d x) \, dx=\int { {\left (b \sin \left (d x + c\right )^{n} + a\right )}^{2} \tan \left (d x + c\right )^{m} \,d x } \]
Timed out. \[ \int \left (a+b \sin ^n(c+d x)\right )^2 \tan ^m(c+d x) \, dx=\int {\mathrm {tan}\left (c+d\,x\right )}^m\,{\left (a+b\,{\sin \left (c+d\,x\right )}^n\right )}^2 \,d x \]